Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial support and doc for ad2s1210 #11

Merged
merged 6 commits into from
Oct 13, 2023
Merged

Conversation

apelete
Copy link
Collaborator

@apelete apelete commented Sep 20, 2023

This adds initial support and doc for AD2S1210 Resolver-to-Digital Converter.

Matlab implementation currently depends on AD2S1210 Linux driver work-in-progress implementation (see AD2S1210 updates #2261).

Consequently, this is an initial support proposal to build upon based on AD2S1210 Linux driver implementation.

@apelete apelete requested a review from ribdp September 20, 2023 10:38
@apelete apelete mentioned this pull request Sep 20, 2023
3 tasks
@apelete apelete force-pushed the aseketeli/ad2s1210-support branch 2 times, most recently from 71eab14 to e3f00b7 Compare September 20, 2023 11:07
@ribdp ribdp requested a review from tfcollins September 20, 2023 11:41
+adi/+AD2S1210/Rx.m Outdated Show resolved Hide resolved
+adi/+AD2S1210/Rx.m Outdated Show resolved Hide resolved
Copy link
Contributor

@tfcollins tfcollins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the get* should be get.* methods. For the scale properties, are these writable? How are they used?

@pamolloy pamolloy added this to the BayLibre September Delivery milestone Sep 21, 2023
@apelete
Copy link
Collaborator Author

apelete commented Sep 21, 2023

All the get* should be get.* methods. For the scale properties, are these writable? How are they used?

All renamed as asked.
Scale properties are read-only, these values are a multiplier to be applied to the corresponding "raw" property value to obtain the measured value in specified units.

@apelete apelete requested a review from tfcollins September 22, 2023 06:52
@dlech dlech linked an issue Sep 25, 2023 that may be closed by this pull request
3 tasks
+adi/+AD2S1210/Rx.m Outdated Show resolved Hide resolved
+adi/+AD2S1210/Rx.m Outdated Show resolved Hide resolved
+adi/+AD2S1210/Rx.m Outdated Show resolved Hide resolved
Copy link
Contributor

@tfcollins tfcollins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need some updates related to the get methods

@apelete
Copy link
Collaborator Author

apelete commented Sep 26, 2023

Need some updates related to the get methods

Updated get methods for Dependent properties.

@apelete apelete requested a review from tfcollins October 2, 2023 13:24
ExcitationFrequency = 0;
end

properties (Hidden)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This property is not being used - can be removed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Attribute was removed from the driver indeed ; removing it here too to stay in sync.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I wasn't aware ExcitationFrequency had been removed from the driver. I was actually referring to the FramesCount property.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

@apelete apelete Oct 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I wasn't aware ExcitationFrequency had been removed from the driver. I was actually referring to the FramesCount property.

SamplesPerFrame property seems to be mandatory; here is the error message I get whent trying to remove it :

Abstract classes cannot be instantiated. 
Class 'adi.AD2S1210.Rx' inherits abstract methods or properties but does not implement them.
See the list of methods and properties that 'adi.AD2S1210.Rx' must implement if you do not intend the class to be abstract.

Abstract properties for class adi.AD2S1210.Rx:
    SamplesPerFrame	% defined in matlabshared.libiio.base

It looks like the attribute is still there in the driver? https://github.com/analogdevicesinc/linux/blob/71da83b0b094a92ed4c2b8c21503638b3557ac56/drivers/staging/iio/resolver/ad2s1210.c#L609

There's actually an upstream proposal to convert it to a channel attribute (thus warranting the need to remove it from the Matlab code for now):
https://lore.kernel.org/all/[email protected]/

@CLAassistant
Copy link

CLAassistant commented Oct 5, 2023

CLA assistant check
All committers have signed the CLA.

@apelete
Copy link
Collaborator Author

apelete commented Oct 9, 2023

@ribdp @tfcollins AFAIK requested changes were implemented so far : any update on this ?

@ribdp
Copy link
Contributor

ribdp commented Oct 10, 2023

@ribdp @tfcollins AFAIK requested changes were implemented so far : any update on this ?

Similar comment as here: #12 (comment) . The idea is that running that script would update sysobjs.json, which in turn will be used to generate documentation automatically, for the AD4020 and the AD2S1210

@apelete
Copy link
Collaborator Author

apelete commented Oct 10, 2023

Similar comment as here: #12 (comment) . The idea is that running that script would update sysobjs.json, which in turn will be used to generate documentation automatically, for the AD4020 and the AD2S1210

Thanks for the quick reply : latest commit updates sysobjs.json as per your instructions.

@ribdp
Copy link
Contributor

ribdp commented Oct 10, 2023

Confirmed documentation gets generated properly: https://ribdp.github.io/PrecisionToolboxForked/master/sysobjects/adi.AD2S1210.Rx/

Looks good to me.

tfcollins
tfcollins previously approved these changes Oct 10, 2023
ribdp
ribdp previously approved these changes Oct 10, 2023
@apelete apelete force-pushed the aseketeli/ad2s1210-support branch from 0cda0b0 to ce09788 Compare October 11, 2023 10:36
@apelete
Copy link
Collaborator Author

apelete commented Oct 11, 2023

@ribdp @tfcollins I rebased and signed all commits with GPG to get them verified, can you please merge this pull request into main branch ?
I am not able to do so through GitHub webui, getting the following error when clicking on "Rebase and merge" button :

Merge attempt failed

Base branch requires signed commits. Rebase merges cannot be automatically signed by GitHub

@apelete
Copy link
Collaborator Author

apelete commented Oct 12, 2023

@ribdp @tfcollins There may be a merge issue when signing the commits with GPG according to documentation (https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification#signature-verification-for-rebase-and-merge) :

When using the Rebase and Merge option on a pull request, it's important to note that the commits in the head branch are added to the base branch without commit signature verification. When you use this option, GitHub creates a modified commit, using the data and content of the original commit. This means that GitHub didn't truly create this commit, and can't therefore sign it as a generic system user. GitHub doesn't have access to the committer's private signing keys, so it can't sign the commit on the user's behalf.

A workaround for this is to rebase and merge locally, and then push the changes to the pull request's base branch.

Do you want me to squash and merge all commits before you push the resulting single commit into the main branch to work around this issue ?

@ribdp
Copy link
Contributor

ribdp commented Oct 13, 2023

Hi @apelete I do see another issue with the merge check, although upon looking into it it's not related to this PR's changes. So if you could just resolve the merge conflicts, I'd merge and close both PRs. Squashing might not be necessary now, but if it is I'll do that as well.

@apelete apelete dismissed stale reviews from ribdp and tfcollins via 0231374 October 13, 2023 13:55
@apelete apelete force-pushed the aseketeli/ad2s1210-support branch from ce09788 to 0231374 Compare October 13, 2023 13:55
This adds initial support for AD2S1210 Resolver-to-Digital Converter.

Signed-off-by: Apelete Seketeli <[email protected]>
Signed-off-by: Apelete Seketeli <[email protected]>
Signed-off-by: Apelete Seketeli <[email protected]>
@apelete apelete force-pushed the aseketeli/ad2s1210-support branch from 0231374 to 5bba5da Compare October 13, 2023 13:57
@apelete
Copy link
Collaborator Author

apelete commented Oct 13, 2023

Hi @apelete I do see another issue with the merge check, although upon looking into it it's not related to this PR's changes. So if you could just resolve the merge conflicts, I'd merge and close both PRs. Squashing might not be necessary now, but if it is I'll do that as well.

@ribdp I rebased on main branch again and solved the conflicts, should be good for merging now.

@ribdp ribdp merged commit 58dda4b into main Oct 13, 2023
2 checks passed
@dlech dlech deleted the aseketeli/ad2s1210-support branch October 13, 2023 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for AD2S1210
5 participants